module.exports = {

    async curl(url, config) {

        const result = await this.ctx.curl(url, config);

        var data = result.data;

        var transformationResult = {
            Original: result,
            status: result.status,
            headers: result.headers,
            data: {
                meta: {
                    success: data.code == 0,
                    message: data.message
                },
                data: data.data
            }
        }

        return transformationResult;
    }
}